﻿using Bricks.Business.Models.Account;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;

namespace Bricks.Site.Models
{
    //public class UserView
    //{
    //    public int Id { get; set; }

    //    public string UserName { get; set; }

    //    public string NickName { get; set; }

    //    public string Email { get; set; }

    //    public bool IsDeleted { get; set; }

    //    public DateTime AddDate { get; set; }

    //    public int LoginLogCount { get; set; }

    //    public IEnumerable<string> RoleNames { get; set; }
    //}

    public class UserView : UserInfo
    {
        /// <summary>
        /// 确认密码
        /// </summary>
        //[Display(Name = "确认密码")]
        //public string ConfirmPassword { get; set; }

        [Display(Name = "所属机构")]
        public Guid? OrgID { get; set; }

        [Display(Name = "所属机构")]
        public string OrgName { get; set; }

        [Display(Name = "旧的OrgID")]
        public Guid? OldOrgID { get; set; }

        [Display(Name = "权限管理员")]
        public bool IsPurviewAdmin { get; set; }

        [Display(Name = "分发管理员")]
        public bool IsHandoutAdmin { get; set; }

        [Display(Name = "流程审批人")]
        public bool IsFlowApprovalPerson { get; set; }

        [Display(Name = "用户机构ID")]
        public Guid? UserOrgID { get; set; }

        /// <summary>
        /// 是否选择（辅助用户批量授权时，判断用户是否选中）
        /// </summary>
        public bool IsChecked { get; set; }
    }

    public class OrgUserView
    {
        public OrgUserView()
        {
            attributes = new OrgUserAttributesView();
        }

        //编码
        public string id { get; set; }

        //名称
        public string text { get; set; }

        //父Code
        public string parent { get; set; }

        public OrgUserAttributesView attributes { get; set; }
    }

    public class OrgUserAttributesView
    {
        public OrgUserAttributesView()
        {
            type = "0";
        }

        //类型：0是机构，1是用户
        public string type { get; set; }
    }
}
